Detection of passing magnetic articles while adapting the detection threshold

ABSTRACT

A method for detection of passing magnetic articles which includes an initial step of sensing an ambient magnetic field and generating a voltage, Vsig, proportional to the magnetic field. A threshold voltage is generated as a percentage of the peak-to-peak voltage of Vsig. The method further includes the step of generating a detector output voltage that becomes one binary level when Vsig rises to exceed the threshold voltage and another binary level when Vsig falls to below the threshold voltage. The threshold voltage is updated to track the positive and negative peaks of the Vsig voltage and is further updated by a predetermined amount upon each transition of the Vout voltage.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation-in-part application of U.S. patentapplication Ser. No. 08/847,703 entitled “DETECTION OF PASSING MAGNETICARTICLES WHILE PERIODICALLY ADAPTING DETECTION THRESHOLD” filed on Apr.28, 1997, now U.S. Pat. No. 5,917,320, which is a continuation-in-partapplication of U.S. patent application Ser. No. 08/587,407, filed onJan. 17, 1996, now U.S. Pat. No. 5,650,719.

STATEMENTS REGARDING FEDERALLY SPONSORED RESEARCH

Not applicable.

BACKGROUND OF THE INVENTION

This invention relates to a proximity detector including a Hall-voltagepeak-to-peak percentage threshold detector, and especially to aferrous-gear-tooth Hall-transducer, or other magnetic-field-to-voltagetransducer, capable of detecting the leading and trailing gear toothedges of an adjacent rotating ferrous gear, or other magnetic articles,and more particularly relates to such a Hall sensor with detectionthresholds that adapt to the peak to peak amplitude of the Hall voltage.

The term “magnetic” as used herein applies to magnetized bodies, ferrousbodies and other bodies having a low magnetic reluctance that tend toalter the ambient magnetic field.

In the patent U.S. Pat. No. 5,442,283, issued Aug. 15, 1995 there isdescribed a proximity detector including a Hall-voltage slope-activated,or peak-referenced detector capable of detecting the rising and fallingedges of a gear tooth. The detector includes a circuit for tracking aslope of a Hall voltage and briefly holding the ensuing peak voltagebefore producing a pulse signal indicating the onset of the followingHall-voltage slope of opposite direction. The Hall voltage holdingcircuit includes a capacitor and circuit means for controllably leakingcharge out of or into the capacitor for preventing false tripping of acomparator that provides a pulse output signal. The holding voltage ofthe capacitor thus has a droop which leads to increasing loss of holdingaccuracy as the speed of gear tooth passage becomes slower, andtherefore the detector has a minimum gear tooth speed at which accuratedetection is possible.

The changes in the ambient magnetic field and corresponding changes inthe transducer voltage caused by the passing of magnetic articles tendto vary. Most such proximity detectors of the prior art produce a highbinary output voltage indicating proximity of a passing article, andproduce a low binary voltage when the article recedes from the detector.

The transition in detector output voltage from low to high typically istriggered by a comparator that determines when the transducer voltagerises to equal a fixed internal threshold voltage reference, or in thecase of the above described slope-activated, or peak-referenceddetector, determines when a transducer voltage peak has just occurredand the signal voltage drops a predetermined incremental voltage fromthe peak value.

These prior art proximity detectors, having fixed threshold voltages,produce a low to high (or high to low) output voltage that correspondsto different locations in the transducer voltage waveform when there arechanges in the amplitude of the transducer voltage.

The sources of such changes in transducer voltage amplitude are many.For example, gear teeth (articles) may have different ferro-magneticproperties from tooth to tooth and undulating changes in the spacings(air gap) gear teeth to transducer caused by eccentricity of the gear.Also, changes in temperature can cause changes in air gap dimensions andin the sensitivity of the transducer and transducer-voltage amplifier.Furthermore, the magnetic-field-to voltage transducer in a proximitydetector typically includes an internal DC offset voltage that varieswith mechanical stresses and temperature.

Such changes in the transducer voltage therefore cause shifts in thetiming of proximity detection relative to the actual distances ofarticle approach and receding at which these transducer voltages exceedor fall below the fixed thresholds. This results in loss of accuracy inproximity detection that has become less and less tolerable especiallywhen employed for detection of the rotational position of a gear bysensing the proximity of the gear teeth.

It is an object of this invention to provide a proximity detector thatgenerates a binary output voltage wherein the transitions accuratelycorrespond to a definite point of approach and a definite point ofreceding of a passing magnetic article.

It is a further object of this invention to provide a magnetic articleproximity detector that periodically determines when the amplitude oroffset of the magnetic-field-to-voltage transducer voltage has changedsignificantly, and adjusts the detection threshold as needed to beessentially a predetermined constant percentage of the peak to peakvalue of a changing detector-transducer-voltage amplitude.

BRIEF SUMMARY OF THE INVENTION

The invention relates to a method for detecting passing magneticarticles which includes an initial step of sensing an ambient magneticfield and generating a voltage, Vsig, proportional to the magneticfield. A threshold voltage is generated as a percentage of thepeak-to-peak voltage of Vsig. The method further includes the step ofgenerating a detector output voltage that becomes a first binary levelwhen Vsig rises to exceed the threshold voltage and a second binarylevel when Vsig falls to below the threshold voltage. More particularly,a PDAC voltage is generated as a function of the positive peak values ofVsig and an NDAC voltage is generated as a function of the negative peakvalues of Vsig. The threshold voltage is updated by a predeterminedamount upon each transition of the detector output voltage and isfurther updated to track the positive and negative peaks of the Vsigvoltage.

With this arrangement, a relatively simple and robust circuit andtechnique are provided for updating the PDAC and NDAC voltages to ensurethat the threshold voltage remains, within a predetermined tolerance, apercentage of the peak-to-peak Vsig voltage. This method furtherprovides additional hysteresis which serves to reduce the susceptibiltiyof the circuit to noise on the Vsig signal and which is introduced at atime when the switch points defining transitions of the detector outputvoltage are not affected. Further, the method has a relatively fastresponse time, since complex threshold voltage updating decisions areeliminated by updating the threshold voltage by a predetermined amountafter transitions of the detector output voltage. Additionally, thesimplicity of the threshold voltage updating technique results insimplified circuit testing and thus, a reduction in manufacturing timeand cost.

The threshold voltage is at a first level corresponding to a firstpercentage of the peak-to-peak Vsig voltage when Vsig exceeds thethreshold voltage and is at a second level corresponding to a secondpercentage of the peak-to-peak Vsig voltage when Vsig is less than thethreshold voltage. With this arrangement, the threshold voltage isprovided with hysteresis. More particularly, the first level of thethreshold voltage is a first percentage of the voltage PDAC−NDAC and thesecond level of the threshold voltage is a second percentage of thevoltage PDAC−NDAC.

The threshold voltage updating step includes decreasing the PDAC voltageby the predetermined amount upon transitions of the detector outputsignal from one of the binary levels to the other and increasing theNDAC voltage by the predetermined amount upon opposite transitions ofthe detector output signal. The threshold voltage updating step furtherincludes permitting the PDAC voltage to track the positive peaks of theVsig signal and permitting the NDAC voltage to track the negative peaksof the Vsig voltage.

Also described is a magnetic article detector comprising a magneticfield sensor providing a voltage output signal, Vsig, proportional tothe magnetic field, a threshold voltage generator operative to generatea threshold voltage that is a percentage of the peak-to-peak voltage ofVsig and a comparator comparing Vsig to the threshold voltage togenerate a detector output voltage. The detector output voltage becomesone binary level when Vsig rises to exceed the threshold voltage andanother binary level when Vsig falls to below the threshold voltage. Thethreshold voltage is updated by a predetermined amount upon eachtransition of the detector output voltage and is further updated totrack the positive and negative peaks of the Vsig voltage. A hysteresiscircuit provides the threshold voltage at a first level that is a firstpercentage of the peak-to-peak voltage of Vsig when Vsig exceeds thethreshold voltage and at a second level that is a second percentage ofthe peak-to-peak voltage of Vsig when Vsig is below the thresholdvoltage.

The threshold voltage generator includes a PDAC voltage generator, anNDAC voltage generator, and a circuit coupled between the PDAC voltageand the NDAC voltage for providing the threshold voltage as a percentageof the difference between the PDAC voltage and the NDAC voltage. ThePDAC voltage generator includes a first counter having an output atwhich a first count signal is provided and a first digital to analogconverter having an input coupled to the output of the first counter andan output at which the PDAC voltage is provided. The first countercounts up causing the PDAC voltage to increase when the Vsig voltage isgreater than the PDAC voltage, thereby causing the PDAC voltage to trackthe positive peaks of the Vsig voltage. The first counter counts downfor a predetermined duration upon transitions of the detector outputvoltage of a first polarity, thereby decreasing the PDAC voltage by apredetermined amount. Similarly, the NDAC voltage generator includes asecond counter having an output at which a second count signal isprovided and a second digital to analog converter having an inputcoupled to the output of the second counter and an output at which theNDAC voltage is provided. The second counter counts down causing theNDAC voltage to track the negative peaks of the Vsig voltage and countsup for a predetermined duration upon transitions of the detector outputvoltage of a second polarity, thereby increasing the NDAC voltage by apredetermined amount.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a block diagram of a first magnetic-article proximitydetector.

FIG. 2 shows a waveform of the Hall voltage, Vsig, in the circuit ofFIG. 1 which waveform corresponds to the ambient magnetic field at thepassage of one ferrous gear tooth (or other magnetic article). FIGS. 2and 3 are drawn to the same scale.

FIG. 3 shows the waveform of the output signal, Vout, from the proximitydetector of FIG. 1, corresponding in time to the Hall voltage waveformof FIG. 2.

FIG. 4 shows a waveform of signal, Vsig, attributable to the passing ofa plurality of magnetic articles that generate uneven amplitudes fromone to the other in the ambient magnetic field. Shown superimposed onVsig are the simultaneously generated DAC output voltages V_(Pnew) andV_(Nnew).

FIG. 5 shows a waveform of Vsig during one update interval of 64 pulsesin Vsig and during a portion of a succeeding update interval, whereinthe peak positive and negative values in Vsig are changing. Superimposedon Vsig are the DAC voltages V_(Pnew) and V_(Nnew), in the one intervaland V_(Pnew) and V_(Nnew) in the succeeding update interval.

FIG. 5a shows a waveform of the update signal, Vupdt, drawn to the scaleas is FIG. 5.

FIG. 6 shows a few periods of the transducer signal Vsig in which anupdate interval terminates at tupdate and a successive tupdate intervalbegins.

FIGS. 7, 8, 9, 10, 11 and 12 show, for the proximity detector of FIG. 1,the waveforms respectively of the input signal to latches 42 and 52, thereset signal to counters 17 and 27, Vpcomp, Vncomp, Q33 b, and theproximity-detector output signal Vout, all drawn to the time scalecorresponding to that of FIG. 6.

FIG. 13 shows a schematic of a second magnetic-article proximitydetector.

FIG. 14 shows a schematic of the update controller of the proximitydetector of FIG. 13.

FIG. 15 shows a waveform of Vsig with the VTH threshold voltage, thePDAC voltage and NDAC voltage generated by the detector of FIG. 13superimposed thereon.

FIG. 16 shows a waveform of Vout generated by the detector of FIG. 13during the same time interval shown in FIG. 15.

FIG. 17 shows a waveform of Vsig during several update time intervals inwhich the positive peak values in Vsig are changing. Superimposed onVsig are the PDAC, PDAC−ΔV, NDAC and NDAC+ΔV voltages generated by thedetector of FIG. 13.

FIG. 17a shows a waveform of Vsig during several update time intervalsin which the negative peak values in Vsig are changing. Superimposed onVsig are the PDAC, PDAC−ΔV, NDAC and NDAC+ΔV voltages generated by thedetector of FIG. 13.

FIG. 18 is a flow diagram illustrating operation of the detector of FIG.13 in updating the PDAC voltage in accordance with certain changes inthe positive peak values of Vsig.

FIG. 19 is a flow diagram illustrating operation of the detector of FIG.13 in updating the NDAC voltage in accordance with certain changes inthe negative peak values of Vsig.

FIG. 20 shows a waveform of Vsig during two update time intervals, withthe PDAC, PDAC−ΔV, NDAC and NDAC+ΔV voltages superimposed thereon.

FIGS. 20a, 20 b, 20 c, 20 d, 20 e, 20 f and 20 g show, for the detectorof FIG. 13, respective waveforms of the cnt128 signal, the Vout signal,the p_ok signal, the upd_pdac signal, the dcrp signal, the p_cnt_upsignal and the clk signal, all drawn to the same time scale as FIG. 20.

FIG. 21 shows a schematic of a third magnetic-article proximitydetector.

FIG. 22 shows a schematic of the update controller of the proximitydetector of FIG. 21.

FIG. 23 shows a waveform of Vsig during several update time intervals inwhich the positive peak values in Vsig are changing. Superimposed onVsig are the PDAC, PDAC−ΔV, NDAC and NDAC+ΔV voltages generated by thedetector of FIG. 21.

FIG. 23a shows a waveform of Vsig during several update time intervalsin which the negative peak values in Vsig are changing. Superimposed onVsig are the PDAC, PDAC−ΔV, NDAC and NDAC+ΔV voltages generated by thedetector of FIG. 21.

FIG. 24 is a flow diagram illustrating operation of the detector of FIG.21 in updating the PDAC voltage in accordance with certain changes inthe positive peak values of Vsig.

FIG. 25 is a flow diagram illustrating operation of the detector of FIG.21 in updating the NDAC voltage in accordance with certain changes inthe negative peak values of Vsig.

FIG. 26 shows a waveform of Vsig during three update time intervals,with the PDAC and PDAC−ΔV voltages superimposed thereon.

FIGS. 26a, 26 b, 26 c, 26 d, 26 e, 26 f, 26 g, 26 h and 26 i show, forthe detector of FIG. 21, respective waveforms of the pcomp signal, thep_latbig signal, the p_cnt_up signal, the p_ok signal, the p_latsmsignal, the p_update signal, the phold signal, the CLK signal and thecnt128 signal, all drawn to the same time scale as FIG. 26.

FIG. 27 a schematic of a further magnetic-article detector.

FIG. 28 shows a schematic of the update controller of the detector ofFIG. 27.

FIG. 29 shows a waveform of Vsig having changing positive peak values,with the PDAC voltage and the VTH threshold voltage superimposed onVsig.

FIG. 29a shows the Vout waveform for the Vsig waveform of FIG. 29.

FIG. 29b is an expanded view of a portion of the Vsig and VTH thresholdvoltages of FIG. 29.

FIG. 30 shows a waveform of Vsig having changing negative peak valueswith the NDAC voltage and the VTH threshold voltage superimposed onVsig.

FIG. 30a shows the Vout waveform for the Vsig waveform of FIG. 30.

FIG. 31 shows a waveform of Vsig, with the PDAC and NDAC voltages andthe VTH threshold voltage superimposed thereon.

FIGS. 31a, 31 b, 31 c, 31 d, 31 e, 31 f, 31 g, 31 h, 31 i, 31 j, and 31k show, for the detector of FIG. 27, respective waveforms of the Voutsignal, the dcrp signal, the CLK signal, the p_cnt_up signal, the countof the positive ring counter, the pdone signal, the dcrn signal, the CLKsignal, the n_cnt_up signal, the cout of the negative ring counter, andthe ndone signal, all drawn to the same time scale as FIG. 31.

FIG. 32 shows an illustrative comparator of FIG. 27 having anintegrator.

FIG. 33 illustrates the operation of the comparator of FIG. 32 inprocessing an illustrative noisy Vsig signal.

DETAILED DESCRIPTION OF THE INVENTION

The Hall element 10 of FIG. 1 is energized by a current I_(H) and has anoutput connected to the input of a Hall voltage amplifier 12. Hallelement 10 may be mounted at a pole of a magnet (not shown), so thatwhen a ferrous article approaches, the Hall voltage V_(H) and theamplified Hall voltage Vsig increase (or decrease); and when the articlerecedes, V_(H) and Vsig decrease (or increase depending on the polarityof the magnet pole). Alternatively, the sensor circuit of FIG. 1 may beused to detect magnetic articles that themselves are magnetized, inwhich case the Hall element need not be mounted adjacent a magnet.

A magneto resistors bridge (not shown) may be substituted for the Hallelement. And two Hall elements with their outputs connecteddifferentially to the input of the Hall voltage amplifier (not shown)represents a second alternative magnetic-field-to-voltage transducer.

The amplified Hall voltage Vsig is manipulated by the remaining circuitsin the proximity detector of FIG. 1 to produce a binary square waveoutput signal, Vout, that like a shadow graph reflects the profile ofthe passing articles.

Referring to FIG. 1, the amplified Hall voltage Vsig is applied to thepositive input of a first comparator 14 and is also applied to thepositive input of one second comparator 16 and to the negative input ofanother second comparator 26 which generate Vpcomp and Vncomprespectively (FIGS. 9 and 10). A composite latch, composed of theinvertors 32 a and 32 b and the clocked flip-flops 33 a and 33 b forproducing an intermediate signal Q33 b (FIG. 11) and proximity-detectoroutput voltage Vout (FIG. 12). The circuitry including comparators 16and 26, invertors 32 a and 32 b, and flip flops 33 a and 33 b comprise apeak-to-peak percentage threshold detector in which the comparatorhysteresis circuitry biases the center of the comparator hysteresis loopto a level corresponding to a predetermined percentage of thepeak-to-peak transducer signal.

Referring to FIGS. 2 and 3, and also to FIGS. 6 and 9, during eachpositive going portion of Vsig, the voltage Vsig falls from the positivepeak and at time t₁ goes below the threshold reference voltage V_(Pth),produced at a tap in the resistive voltage divider 34. At times t₁, theoutput V_(pcomp) of comparator 16 goes from a binary high to a low levelas in FIG. 9, and Vout goes from a high to a low level as seen in FIG.12.

During each negative going portion of Vsig, the voltage Vsig rises (orfalls away) from the negative peak and at time t₂ goes above thethreshold reference voltage V_(Nth), produced at low tap in theresistive voltage divider 34. At times t₂, the output V_(ncomp) ofcomparator 16 goes from a binary low to a high as in FIG. 10, and Voutgoes from a low to a high level as seen in FIG. 12.

Assuming, as a starting point, that the counter 17 is at zero count,when the output of the first comparator 14 goes high the counter 17begins counting the clk pulses from clk 18. The resulting count ispresented to the digital-to-analog converter (PDAC1) 20 which producesan output analog voltage V_(Pnew) always lying somewhere within therange from zero to the DC supply voltage, +Vreg. At any instant theamplitude of V_(Pnew) is a direct linear function of the count signalfrom counter 17. When power is first applied to the detector circuit, alogic block (not shown) senses the time of turning on of the DC supplyvoltage, +Vreg, and resets the counters to zero count.

The comparator 14 has hysteresis and so is a Schmitt type comparator.The output of the DAC 20 (PDAC1) is connected to the negative input ofthe comparator 14 so that whenever Vsig becomes greater than voltageV_(Pnew) plus the small hysteresis threshold voltage V_(hys1) of thecomparator 14, then the comparator 14 output goes high. If at that timeVout is low, then the output of AND gate 15 goes high and the counter 17is enabled and counting. When Vsig is growing more positive, V_(Pnew) iscaused to track Vsig in stair step fashion, as is illustrated in FIG. 4.The incremental vertical excursions of the stair stepped V_(Pnew) areequal to Vreg/2^(n), where n is the number of DAC bits. The incrementalhorizontal times, Δt1, increase as the slope of Vsig decreases.

As is illustrated in FIG. 4, when a peak positive voltage of Vsig isreached, the counter 17 stops counting (e.g. at time t_(pp1)) andV_(Pnew) holds this peak voltage until at a subsequent positive pulse inthe signal Vsig that is greater than the held voltage V_(Pnew), V_(Pnew)again begins to track the subsequent positive pulse to its peak and tohold (e.g. at time t_(pp2)) that new peak voltage.

An update counter 36 is a six bit counter which counts the low-to-hightransitions, i.e. positive transitions, in the proximity-detector outputsignal Vout. When at time t_(update), 64 positive binary transitionshave been counted, counter 36 wraps and starts again from zero count tocount the ensuing positive transitions. Referring to FIGS. 5, 5 a, 6, 7and 8, at t_(update) the output of the update counter 36 goes high andlatches 42 and 52 are enabled and then disabled before the counter 17(and counter 27) is (are) reset via the delay circuit 39.

Thus at the end of each update time interval of 64 counts, the PDAC1output voltage V_(Pnew) holds the positive peak voltage of the highestpositive excursion that has occurred in the signal Vsig during thatupdate time interval. The most recent maximum peak positive voltage inVsig is accordingly updated at the end of each update time interval of apredetermined number of excursions of one polarity in Vsig. Thepredetermined (count) number in this example was set at 64 positiveexcursion peaks and the counter 36 is accordingly a six bit counter, butthis number is not critical.

At the end of each count 64, the output of the update counter 36 goeshigh to enable the update AND gate 38. If the update signal, Vupdt, issimultaneously high, the output of the update AND gate 38 goes high andenables the latch 42. Latch 42 holds the count in counter 17 during thefollowing update time interval (of 64 pulses in Vsig). That count isapplied to the input of PDAC2 44 during that update time interval. Atthe end of the first update time interval following detector startup,PDAC2 44 generates at its output an analog signal V_(Pold) that is equalto the initial amplitude of Vsig at the beginning of the first updatetime interval (left-most update time interval as seen in FIG. 5).

A window comparator 46 has a reference-voltage input connected to theoutput of PDAC1 20. The output signal v_(Pold) from PDAC2 is applied viaa unity gain buffer stage 48 to one end of the resistor voltage divider34. And from there the signal V_(Pold) is applied to the plus and minusinputs of the window comparator 46 via respectively the additive andsubtractive DC bias voltages Δv.

Referring to FIG. 5, at the end of an update time interval, timet_(update), the output of window comparator 46 goes high only ifV_(Pnew) lies outside of the range from V_(Pold)+Δ and V_(Pold)−Δ. If atthe end of an update interval, V_(Pnew) is higher than or lower thanthis range then the output of the window comparator goes high causingthe output of OR gate 50 to go high. This in turn causes the output ofAND gate 38 to go high, and causes latch 42 to latch in the currentcount in counter 17. As is illustrated in FIG. 5, this updates V_(Pold),namely PDAC2 44 generates at its output an analog signal V_(Pold) thatis equal to the initial amplitude of the held V_(Pnew) generated duringthe preceding update time interval. All update time intervals followingthe first update time interval begin with a decision as to whether toupdate V_(xold) to the last held value of V_(xnew) of the preceding timeinterval as illustrated in the second time interval of FIG. 5.

If the current value of V_(new), namely the maximum peak positive peakvalue of Vsig during an entire update time interval, is not outside ofand lies within the range from V_(Pold)+Δ and V_(Pold)−Δ at the end ofthat update time interval, then the output of comparator 46 remains lowand latch 42 will not be enabled.

A lower circuit portion in the proximity detector of FIG. 1 essentiallymirrors the construction of the upper portion just described. The lowercircuit portion manipulates the negative pulses in Vsig in the same wayas does the upper portion with respect to positive pulses in Vsig.Except for the holding of negative peaks in Vsig by NDAC1 30, latch 52and NDAC2, there is no action going on in the lower circuit portionduring positive going portions of Vsig.

For example, the output of comparators 24 and 26 go high only when Vsiggoes negative. Thus only when Vsig is going negative are there changesof state in the signals of AND gate 25, counter 27, NDAC1 30, latch 52,NDAC2 54, buffer 58 and window comparator 56. The upper (P) and lower(N) portions of the circuit share the clk 18, the reset delay circuit 39and the OR gate 50. It should be noted that the DC reference voltages+Vreg and ground are connected to NDAC1 30 and NDAC2 54 inversely withrespect to those connections to PDAC1 20 and PDAC2 44. Thus instead ofthe output voltage going up as the count increases (in counter 17) tothe PDACs, the output voltage of the NDACs goes down as the count (incounter 27) goes up. Alternatively, the NDACS could have been connectedto the DC reference voltages as are the PDACs if the counter 27 had beenof the kind that counts down from maximum count. Also, the counters 17and 27 are of the kind that include an anti-overflow feature thatprevents wrapping of the count when maximum count is exceeded, whereascounter 36 is of the simple kind that does wrap. The resistive voltagedivider 34 is a component that bridges the upper and lower circuitportions.

The ends of voltage divider 34 are connected respectively to the outputsof buffer stages 48 and 58. The held signal V_(Pold) is applied to theupper end and the held signal V_(Nold) is applied to the lower end ofvoltage divider 34. At the resistance center (from which there are equalresistances to the two ends) a voltage Vos is generated which is equalto the center voltage between the held positive peak voltage (of Vsig)V_(Pold) and the held negative peak voltage V_(Nold). The thresholdvoltages V_(Nth) and V_(PNth) are shown respectively at about a thirdthe way up and two thirds the way up the voltage divider 34.

It will now be appreciated that these threshold voltages V_(Nth) andV_(Pth) have been adjusted after every update time interval to remain ata fixed percentage of the peak to peak voltage of Vsig even when thepeak voltages of Vsig vary and/or when the offset voltages included inVsig vary.

Voltage divider 34 is made up of six equal resistance resistors. Thevoltage Vos is 50% of the voltage Vreg. V_(Pth) and V_(Nth) arepreferably set at about 67% and 33% of Vreg, and generally in thesteepest portions of Vsig near Vos. In general, V_(Pth) may be taken atthe center point in the voltage divider, or may be at a higher pointbetween 50% and 100% of the difference voltage V_(Pnew)−V_(Nnew).Likewise, V_(Nth) may be at the center point in the voltage divider,namely at 50% of V_(Pnew)−V_(Nnew), or may be at a lower point between50% and 0% of the difference voltage V_(Pnew)−V_(Nnew). The thresholdV_(Pth) and V_(Nth) may be other than equal magnitudes from centervoltage Vos, i.e. non symmetrical.

In any case, these threshold values vary with time and are always afixed percentage of the current (updated) peak to peak differencevoltage in the signal (Vsig). This has the great advantage whenoperating in peak-to-peak percentage threshold mode as described above,that the proximity sensor provides a binary output voltage wherein thetransitions correspond more accurately to a definite point of approachand point of receding of a passing magnetic article.

Referring to FIG. 13, an alternate embodiment of a magnetic-articleproximity detector is shown, in which like reference numbers refer tolike elements. The detector includes the Hall element 10 providing aHall voltage to the amplifier 12 which provides the amplified Hallvoltage, Vsig, as described above in conjunction with FIG. 1. Like thedetector of FIG. 1, the detector of FIG. 13 is operative to produce abinary square-wave output signal, Vout, at a first binary level whenVsig rises to exceed a threshold voltage and another binary level whenVsig falls to below the threshold voltage. In the embodiment of FIG. 1,the threshold voltage is comprised of the individual V_(Pth) and V_(Nth)voltages whereas, in the embodiment of FIG. 13, the single thresholdvoltage, VTH, is provided with hysteresis.

The embodiments of FIGS. 1 and 13 are further similar in that, in bothcases, the threshold voltage is a percentage of the peak-to-peak voltageof Vsig and is updated to remain the percentage, within a predeterminedtolerance, of the Vsig voltage. Accordingly, both such detectors can becharacterized as peak-to-peak percentage threshold detectors. In theembodiment of FIG. 1, the V_(Pth) threshold voltage is a firstpercentage of Vsig and the V_(Nth) threshold voltage is a secondpercentage of Vsig. In the embodiment of FIG. 13 on the other hand, theVTH threshold voltage is at a first level corresponding to a firstpercentage of Vsig when Vsig exceeds the threshold voltage and is at asecond level corresponding to a second percentage of Vsig when Vsig isless than the threshold voltage (i.e., the threshold voltage VTH isprovided with hysteresis).

It will be appreciated by those of ordinary skill in the art, and iswithin the scope of this invention, that the detectors described hereinmay be implemented in the form of, or to include, mid-signal detectorsin which the threshold voltage is a fixed percentage of the Vsig voltageor peak-referenced (i.e., slope-activated detectors). As one example,the peak-to-peak percentage threshold detectors may include apeak-referenced detector such that the detector output signal Voutbecomes one binary level when Vsig rises to exceed a held negative peakexcursion by a predetermined amount and another binary level when Vsigfalls to below a held positive peak excursion by a predetermined amount.

The Vsig voltage is applied to the positive input of a first comparator100 and to the negative input of a second comparator 104. The outputsignals of comparators 100 and 104 are coupled to an input of respectiveNOR gates 108 and 112. The second input of NOR gates 108 and 112receives a respective control signal from an update controller 120,described further below in conjunction with FIG. 14. Specifically, NORgate 108 has a p_cnt_up_n signal applied to its second input and NORgate 112 has an n_cnt_up_n signal applied to its second input, as shown.

The output of NOR gate 108 is applied to a HOLD input of an up/downcounter 114. The counter output is held constant (i.e., the counter isdisabled) when the HOLD input signal is at a first logic level and isreleased (i.e., the counter is enabled) when the HOLD input signal is atthe second logic level. In the illustrative embodiment, the counter 114is a six bit counter which is enabled when the HOLD input is low. Acontrol signal, p_cnt_up from the update controller 120 (FIG. 14) isapplied to an UPDN input of the counter 114 in order to control thecount direction. As will become apparent, the p_cnt_up signal normallycauses the counter 114 to count up. Under certain conditions however,the p_cnt_up signal causes the counter 114 to count down for a singleclock cycle. The counter 114 is clocked by a system clock signal, clk,and is further responsive to a pndac_resn signal which resets thecounter 114 upon start up of the detector.

The outputs of the counter 114 are coupled to inputs of a PositiveDigital-to-Analog Converter (PDAC) 118. The output of the PDAC 118provides a voltage, PDAC, which is used to generate the detectorthreshold voltage, VTH, as will be described. In operation, the PDACvoltage varies in accordance with certain variations in the positivepeak values of the Vsig voltage. The resolution of the PDAC 118 isselected to ensure that changes in the VTH threshold voltage caused bychanges in the PDAC voltage are substantially imperceptible. In theillustrative embodiment, the resolution of the PDAC 118 is 50 mV. ThePDAC voltage is coupled to a buffer 124 and is fed back to the negativeinput of comparator 100, as shown.

The comparator 100, NOR gate 108, counter 114, PDAC 118 and buffer 124comprise a “positive portion” of the detector circuitry. A “negativeportion” of the detector is similarly arranged. Specifically, the outputof the NOR gate 112 is coupled to a HOLD input of an up/down counter130. The counter 130 is further responsive to the clk clock signal, thepndac_resn reset signal, and an n_cnt_up control signal provided by theupdate controller 120 (FIG. 14) which controls the count direction.

The outputs of the up/down counter 130 are coupled to inputs of aNegative Digital-to-Analog Converter (NDAC) 134 which produces an NDACvoltage used, along with the PDAC voltage, to generate the VTH thresholdvoltage. The NDAC voltage varies in accordance with certain variationsin the negative peak values of the Vsig voltage. Like the PDAC 118, theresolution of the NDAC 134 is selected to ensure that changes in the VTHthreshold voltage caused by changes in the NDAC voltage aresubstantially imperceptible. In the illustrative embodiment, theresolution of the NDAC 134 is 50 mV. The NDAC voltage is coupled to abuffer 136 and is further fed back to the negative input of comparator104, as shown.

The buffered PDAC and NDAC voltages are coupled to a resistor divider140 comprising series resistors 142, 144, 146 and 148 in order togenerate the VTH threshold voltage for comparison to the Vsig voltage bya comparator 160. The output of comparator 160 provides the detectoroutput signal, Vout, which is at a first binary, or logic level when theVsig voltage exceeds the VTH threshold voltage and is at a second binarylevel when the Vsig voltage is less than the VTH threshold voltage.

The VTH threshold voltage is set at a percentage of the peak-to-peakVsig voltage and is adaptive in the sense that it is updated inaccordance with certain variations in the Vsig voltage so as to remainthe percentage, within a predetermined tolerance, of the peak-to-peakVsig voltage. As will become apparent, this arrangement is achieved byusing the PDAC and NDAC voltages to generate the VTH threshold voltageand varying the PDAC and NDAC voltages in accordance with certainvariations in the positive and negative peak values of Vsig,respectively.

The VTH threshold voltage is provided with hysteresis in the sense thatVTH is at a first level corresponding to a first percentage of thepeak-to-peak Vsig voltage when Vsig exceeds the VTH threshold voltageand is at a second level corresponding to a second percentage of thepeak-to-peak Vsig voltage when Vsig is less than the VTH thresholdvoltage. That is, once the Vsig voltage falls below the first level ofthe VTH threshold voltage, the VTH threshold voltage is increased sothat the Vsig voltage has to exceed a second, higher level of the VTHthreshold voltage before the Vout signal transitions. In theillustrative embodiment, the first and second percentages are fixedpercentages of the peak-to-peak Vsig voltage, but providing thepercentages as variable percentages of the peak-to-peak Vsig voltage iswithin the scope of the invention.

More particularly, a pair of switches 166, 168 is provided forselectively “shorting” respective resistors 142, 148. To this end,switches 166 and 168 are coupled in parallel with resistors 142 and 148of resistor divider 140, respectively. The Vout signal from comparator160 is inverted by an inverter 164 to provide a pos_compn signal whichis applied to a control input of switches 166 and 168, as shown. Asecond control input of switches 166 and 168 is responsive to the Voutsignal.

Referring also to FIGS. 15 and 16, when the Vout and pos_compn controlsignals are in first respective logic states, one of the switches 166,168 is open and the other is closed. In the illustrative embodiment,when the Vout signal is at a logic high level and the pos_compn signalis at a logic low level, switch 166 is open and switch 168 is closed.Under this condition, resistor 148 is “shorted” by closed switch 168 andthe VTH threshold voltage is at a first level relative to the PDAC andNDAC voltages. In the illustrative embodiment, the first level isapproximately 40% of the difference between the PDAC and NDAC voltages.When the Vout signal is at a logic low level and the pos_compn signal ishigh, switch 166 is closed and switch 168 is open, thereby causingresistor 142 to be “shorted”. Under this condition, the VTH thresholdvoltage is at a second level which, in the illustrative embodiment, isapproximately 60% of the PDAC−NDAC voltage. Since the PDAC and NDACvoltages are updated in accordance with certain variations in the Vsigvoltage as will be described, the first VTH threshold voltage levelcorresponds to a first percentage, within a predetermined tolerance, ofthe peak-to-peak Vsig voltage and the second VTH threshold voltage levelcorresponds to a second percentage, within a predetermined tolerance, ofthe peak-to-peak Vsig voltage. Generally, both the first and secondpercentages are between 0% and 100% of the peak-to-peak Vsig voltage.More preferably and in the illustrative embodiment, the first percentageis between 0% and 50% and the second percentage is between 50% and 100%.

In order to update the PDAC and NDAC voltages in accordance with certainvariations in the positive and negative peak values of the Vsig voltage,respectively, “voltage ok windows” are established for use by the updatecontroller 120 (FIG. 14). The voltage ok windows establish the“predetermined tolerance” between the VTH threshold voltage andpercentage(s) of the Vsig voltage it represents. A first voltage source170 is coupled to the buffered PDAC voltage to generate a voltage,PDAC−ΔV, which is a predetermined voltage less than the PDAC voltage. Inthe illustrative embodiment, ΔV is the equivalent of two bits, or 100mV. Similarly, a voltage source 172 is coupled to the buffered NDACvoltage to generate a voltage, NDAC+ΔV, which, in the illustrativeembodiment, is the equivalent of two bits higher than the NDAC voltage.A “positive voltage ok window” used to update the PDAC voltage isdefined between the PDAC and PDAC−ΔV voltages and a “negative voltage okwindow” used to update the NDAC voltage is defined between the NDAC andNDAC+ΔV voltages.

Referring to FIGS. 17, 17 a, 18 and 19, the manner by which the PDAC andNDAC voltages are updated in accordance with variations in the positiveand negative peaks of the Vsig voltage, respectively, will be described.Specifically, FIG. 17 illustrates how the PDAC voltage varies withcertain variations in the positive peaks of Vsig over several updatedtime intervals and FIG. 18 is a corresponding flow diagram illustratingoperation of the detector in updating the PDAC voltage. FIG. 17aillustrates the manner in which the NDAC voltage varies with certainvariations in the negative peaks of Vsig over several update timeintervals and FIG. 19 is a corresponding flow diagram. It will beappreciated by those of ordinary skill in the art that the methodsillustrated by FIGS. 18 and 19 are illustrative only and may be readilyvaried, such as by varying the sequence of the steps.

The first time interval ending at time X follows power up of thedetector and is referred to as a start up time interval. Subsequent timeintervals, during and/or after which the PDAC and NDAC voltage may beupdated, are referred to as update time intervals. During the start uptime interval, the PDAC 118 and the NDAC 134 track the highest andlowest peaks of the Vsig voltage, respectively, as shown. Since theinitial Vsig voltage is unknown, the PDAC voltage is set to a valuelower than the least positive expected peak of Vsig, such as thenegative voltage rail, and the NDAC voltage is set to a value greaterthan the least negative expected peak of Vsig, such as the positivevoltage rail. The update controller 120 (FIG. 14), which is operative toupdate the PDAC and NDAC voltages as necessary, is disabled during thestartup time interval.

After the startup time interval, at time X, if any positive peak of Vsigis within the positive voltage ok window during a given time interval,then the PDAC voltage is not updated either during or at the end of theinterval, as is illustrated during the interval between times X and X+1in FIG. 17. If, however, a positive peak value of the Vsig voltageexceeds the positive voltage ok window (i.e., exceeds PDAC), then thePDAC voltage is increased to the value of this positive peak voltage, asillustrated during the interval between times X+2 and X+3 in FIG. 17.Finally, if all of the positive peaks of the Vsig voltage during a giventime interval are less than the positive voltage ok window (i.e., areless than PDAC−ΔV), then the PDAC voltage is decremented by apredetermined amount at the end of that interval, as is illustrated inthe interval between times X+1 and X+2 in FIG. 17. In one embodiment,the PDAC voltage is decremented by one bit at the end of any timeinterval during which all positive peaks of the Vsig voltage are lessthan the positive voltage ok window.

Referring to FIG. 18, the method for updating the PDAC voltage as afunction of the positive peaks of the Vsig voltage commences in step200. In step 204, it is determined whether Vsig is greater than theupper boundary of the positive voltage ok window, or PDAC. If the Vsigvoltage is greater than PDAC, then the PDAC voltage is incremented insubsequent step 208 to the value of the Vsig voltage. In the event thatthe Vsig voltage is not greater than the PDAC voltage, then it is nextdetermined in step 212 whether the current time interval is over. Steps204-212 are repeated until the time interval has ended.

An update time interval is comprised of a predetermined number oftransitions of the Vout voltage. In the illustrative embodiment,preferably, each time interval is comprised of 128 positive (oralternatively 128 negative) transitions of the Vout signal. Moregenerally however, it is advantageous for the time interval to begreater than one revolution of a passing magnetic article. Considering,for example, the case in which the magnetic article is a rotating gearhaving teeth spaced by valleys, this arrangement ensures that thehighest tooth and deepest valley will be detected during each timeinterval.

At the end of each time interval, in step 216, it is determined whetherall of the positive peaks of the Vsig voltage during that particulartime interval were less than the positive voltage ok window (i.e.,PDAC−ΔV). If all of the positive Vsig peaks during the particularinterval were less than PDAC−ΔV, then the PDAC voltage is decremented bya predetermined amount in step 220, following which the processterminates in step 224. In the illustrative embodiment, thepredetermined amount by which the PDAC voltage is decremented is onebit, or fifty millivolts. If however, not all of the positive peaks ofthe Vsig voltage during the interval were less than the positive voltageok window, then the process terminates in step 224, as shown.

Referring to FIGS. 17a and 19, the operation of the detector in updatingthe NDAC voltage in accordance with certain negative peak values of theVsig voltage will be described. In general, the NDAC voltage is updatedin response to the negative peaks of Vsig conversely to the manner inwhich the PDAC voltage is updated in response to the positive peaks ofVsig. Specifically, and as illustrated between times X and X+1 in FIG.17a, as long as one of the negative peaks of the Vsig voltage during agiven interval is within the negative voltage ok window, then the NDACvoltage is not modified. If however, all of the negative peaks of theVsig voltage during the interval were greater than the negative voltageok window (i.e., greater than NDAC+ΔV), then the NDAC voltage isincremented by a predetermined amount, such as one bit, at the end ofthat interval, as illustrated at time X+2. Finally, in the event thatany of the negative Vsig peaks is less than the negative voltage okwindow (i.e., is less than the NDAC voltage), then the NDAC voltage isdecremented to equal that negative peak voltage, as occurs between timesX+2 and X+3 in FIG. 17a.

The operation of the detector in updating the NDAC voltage isillustrated in the flow diagram of FIG. 19 which commences at step 230.In step 234, it is determined whether the Vsig voltage is less than theNDAC voltage. In the event that the Vsig voltage is less than the NDACvoltage, then the NDAC voltage is decremented to equal the value of theVsig voltage. Alternatively, if the Vsig voltage is not less than theNDAC voltage, then step 242 is next performed in which it is determinedwhether the particular time interval has ended. Steps 234-242 arerepeated until an interval has ended, as shown.

At the end of each time interval, it is determined, in step 246, whetherall of the negative peaks of the Vsig voltage during the just endinginterval were greater than the negative voltage ok window (i.e., greaterthan NDAC+ΔV). In the event that all of the negative Vsig peaks duringthe particular interval were greater than the negative voltage okwindow, then the NDAC voltage is incremented by a predetermined amount,such as one bit, in step 250 as illustrated at time X+2 in FIG. 17a,following which the process terminates in step 254. Otherwise, theprocess terminates directly after step 246, as shown.

Referring to FIG. 14, the update controller 120, which is operative tocause the detector to update the PDAC and NDAC voltages as necessary,includes a positive controller portion 122 and a negative controllerportion 126. Since the arrangement and operation of the positive andnegative controller portions 122 and 126 mirror each other, thecircuitry and operation will be described with particular reference tothe positive controller portion 122 for simplicity of illustration.

A counter 128 counts transitions of the Vout voltage of a particularpolarity, such as each positive going transition, to provide an updatetime interval clock signal, cnt128. As noted above, in the illustrativeembodiment, each update time interval is comprised of 128 transitions ofthe Vout output voltage. It will be appreciated by those of ordinaryskill in the art that the update time interval may be readily varied.

The positive controller portion 122 includes a comparator 132 having apositive input to which the Vsig voltage is applied and a negative inputto which the PDAC−ΔV voltage is applied. Thus, the comparator 132compares the Vsig voltage to the lower boundary of the positive voltageok window. The output signal of the comparator 132, p_ok, is applied tothe reset input of a cross-coupled NOR latch 150. The output signal ofthe NOR latch 150, upd_pdac, is applied to the input of a flip-flop 152which is clocked by the cnt128 signal and which provides an outputsignal, dcrp. The dcrp signal is applied to the input of a furtherflip-flop 156 which is clocked by clkn, an inverted version of thesystem clock signal. The Q output of flip-flop 156 provides thep_cnt_up_n signal to the NOR gate 108 (FIG. 13) and to an input of a NORgate 154. The Qbar output of flip-flop 156 provides the p_cnt_up signalwhich is applied to the UPDN input of the counter 114 (FIG. 13) tocontrol the count direction. Flip-flop 152 is reset by the NOR gate 154at detector start up and each time the counter 114 counts down.

The negative controller portion 126 includes a comparator 138 whichcompares the Vsig voltage to the upper boundary of the negative voltageok window, or NDAC+ΔV. The output signal of the comparator 138, n_ok, iscoupled to the reset input of a NOR latch 176, which is set at the endof each update time interval by the cnt128 signal. The Q output of latch176 is a signal, upd_ndac, which is applied to a flip-flop 178.Flip-flop 178 is clocked by the cnt128 signal, as shown, and provides adcrn output signal to a further flip-flop 182 which is clocked by theclkn signal. The Q output of flip-flop 182 provides the n_cnt_up_nsignal to NOR gate 112 (FIG. 13) and further to an input of a NOR gate180. The flip-flop 182 is reset by the NOR gate 180 at detector start upand when the counter 130 counts down. The Qbar output of flip-flop 182provides the n_cnt_up signal to the UPDN input of counter 130 (FIG. 13)to control the count direction.

The latch 150 is set by the cnt128 signal at the end of each update timeinterval. Further, at the end of an update time interval in which thelatch 150 has not been reset, the dcrp signal goes high (i.e., thedecrement bit is set). Upon the next clock cycle following the decrementbit being set, the p_cnt_up_n signal goes high for a single clock cycleand the p_cnt_up signal goes low for a single clock cycle. A low pulseon the p_cnt_up signal of a one clock cycle duration commands thecounter 114 to count down one bit. Recall however, that the counter 114is only able to count, either up or down, if its HOLD input signal islow.

Referring also to FIGS. 20-20g, the operation of the update controller120 will be illustrated by an example. Specifically, FIG. 20 shows twoillustrative update time intervals of the Vsig voltage, with the PDACvoltage, the PDAC−ΔV voltage, the NDAC voltage and the NDAC+ΔV voltagesuperimposed thereon. FIG. 20a illustrates the cnt128 output signal ofthe counter 128 (FIG. 14), FIG. 20b illustrates the detector outputsignal Vout and FIG. 20c illustrates the p_ok output signal ofcomparator 132 (FIG. 14), during the same time intervals shown in FIG.20. FIG. 20d shows the upd_pdac output signal of the NOR latch 150, FIG.20e illustrates the dcrp output signal of flip-flop 152, FIG. 20fillustrates the p_cnt_up output signal of the flip-flop 156 and the clksignal is shown in FIG. 20g, during the same time intervals shown inFIG. 20.

Consider, for example the interval between times X+1 and X+2, in whichall of the positive Vsig peaks are less than the lower boundary of thepositive voltage ok window, PDAC−ΔV. In this case, the p_ok voltageremains low, so the latch 150 is not reset during this interval. Thus,at the end of the interval, the p_cnt_up signal goes low for a singleclock cycle to command the counter 114 to count down by one bit.Further, the counter 114 is enabled under this condition, since thep_cnt_up_n input signal to NOR gate 108 is high and thus, the HOLD inputto counter 114 is low.

In the case where at least one positive Vsig peak during an interval iswithin the positive voltage ok window, as illustrated between times Xand X+1 in FIGS. 20-20g, the PDAC voltage is not modified. Under thiscondition, the p_ok signal goes high to reset the upd_pdac voltage,thereby preventing the decrement bit, dcrp, from being set. Thus, at theend of this interval, the p_cnt_up signal remains high to command thecounter 114 to count up. However, the PDAC voltage is not modified sincethe counter 114 is disabled. More particularly, the HOLD input to thecounter 114 is high since both the output of the comparator 100 and thep_cnt_up_n signal are low.

Finally, when a positive Vsig peak exceeds the PDAC voltage, the PDACvoltage is updated to follow, or track the Vsig positive peak any timeduring the interval. In this case, the p_ok output signal of comparator100 goes high to reset the latch 150. More particularly, the latch 150is reset when Vsig exceeds the PDAC voltage. This condition causes theupd_pdac signal to go low and prevents the decrement bit, dcrp, frombeing set by flip-flop 152 at the end of the interval. Thus, at the endof the interval, the p_cnt_up signal remains high to keep the counter114 in count up mode. This condition also presents a low to NOR gate108, allowing the counter 114 to increment as needed any time during theinterval by releasing the HOLD signal.

Referring also to FIG. 21, an alternate detector embodiment is shown.The detector of FIG. 21 operates in a similar manner to the detector ofFIG. 13 to provide an output voltage Vout which is at one binary levelwhen the Vsig voltage exceeds a threshold voltage VTH and is at anotherbinary level when the Vsig voltage is less than the threshold voltage.Further, the detector of FIG. 21 provides the VTH threshold voltage withhysteresis in a like manner to the detector of FIG. 13. The detector ofFIG. 21 differs from that of FIG. 13, however, in the manner in whichthe PDAC and NDAC voltages are updated in accordance with certainvariations in the positive and negative peaks of the Vsig voltage,respectively. In general, the detector of FIG. 21 is characterized inthat any modifications, or updates to the PDAC and NDAC voltages occurat the end of a particular update time interval and further, in that thePDAC and NDAC voltages are incremented and decremented, respectively, bya predetermined amount. This arrangement is contrasted to varying thePDAC voltage to track a positive peak of Vsig as occurs between timesX+2 and X+3 in FIG. 17 or varying the NDAC voltage to track a negativepeak of Vsig as occurs between times X+2 and X+3 in FIG. 17a. Byincrementing or decrementing the PDAC and NDAC voltages by only apredetermined amount, the occurrence of “hunting” (i.e., the PDAC andNDAC voltages fluctuating to track noise peaks) is reduced.

The detector of FIG. 21 includes the Hall element 10 and the Hallvoltage amplifier 12 which provides the amplified Hall voltage, Vsig, asdescribed above. The Vsig voltage is coupled to the positive input of afirst comparator 260 and to the negative input of a second comparator264, as shown. The output signal of the comparator 260, pcomp, isinverted by an inverter 266 for coupling to a multiplexer 268, as shown.The multiplexer 268 is further responsive to a phold control signalprovided by an update controller 280 (FIG. 22) for selecting between theoutput of the inverter 266 and the phold signal for coupling to themultiplexer output. The output signal 270 of the multiplexer 268provides the HOLD input signal to an up/down counter 274. The selectinput signal to the multiplexer 268, en_update, is provided by across-coupled NOR latch 278, which is set by the startup signal andreset by the cnt128 signal, as shown.

Similarly, the output of the comparator 264 is inverted by an inverter316, the output of which provides an input to a multiplexer 320. Afurther input to the multiplexer 320 is provided by an nhold controlsignal generated by the update controller 280. The multiplexer 320 isresponsive to the en_update signal for selecting between the output ofthe inverter 316 and the nhold signal for coupling to the multiplexeroutput. The multiplexer output provides the HOLD input signal to anup/down counter 322.

The remainder of the detector of FIG. 21 is substantially identical tothe detector of FIG. 13. Specifically, like counter 114 (FIG. 13), thecounter 274 is clocked by the CLK signal and reset by the pndac_resnsignal. A p_cnt_up signal provided by the update controller 280 controlsthe direction of the count by the counter 274. The outputs of thecounter 274 are coupled to inputs of a PDAC 284, the output of whichprovides the PDAC voltage. A buffer 286 buffers the PDAC voltage and avoltage source 290 generates the PDAC−ΔV voltage, which is apredetermined voltage, ΔV, less than the PDAC voltage, such as two bits,or 100 mV.

In the “negative portion” of the detector, the counter 322, like counter130 (FIG. 13), is clocked by the CLK signal and is reset by thepndac_resn signal, as shown. An n_cnt_up signal, provided by the updatecontroller 280, controls the direction in which the counter counts. Theoutputs of the counter 322 are coupled to inputs of an NDAC 324, theoutput of which provides the NDAC voltage, as shown. The NDAC voltage isbuffered by a buffer 328 which provides a buffered NDAC voltage and avoltage source 330 generates the NDAC+ΔV voltage, which is apredetermined voltage, ΔV, greater than the NDAC voltage, such as twobits, or 100 mV.

A resistor divider 292, including series-coupled resistors 294, 296, 298and 300, is coupled across the buffered PDAC and NDAC voltages toprovide the threshold voltage, VTH as shown. Hysteresis switches 304 and306 are arranged and operative to provide the VTH threshold voltage withhysteresis in the same manner described above in conjunction with FIG.13. The VTH threshold voltage is compared to the amplified Hall voltage,Vsig, by a comparator 310, the output of which is the Vout signal. Aninverter 312 inverts the Vout voltage to provide a further control inputsignal to hysteresis switches 304 and 306, as shown.

The logic circuitry which provides the HOLD input signals to thecounters 274 and 322 is operative to hold the output of the respectivecounter constant (i.e., to disable the counter) during each update timeinterval and at the end of any update time interval during which atleast one Vsig peak was within the respective voltage ok window.However, at the end of any update time interval during which a conditionrequiring updating of the PDAC or NDAC voltage occurred, the logiccircuitry is operative to enable the respective counter for a singlesystem clock cycle. In this way, the counter is able to count up or down(depending on the state of the respective p_cnt_up and n_cnt_up signals)by one bit.

Considering the “positive portion” of the HOLD logic circuitry, duringthe first update time interval following startup of the detector, the enupdate signal is high to select the A input to multiplexer 268. With theA input selected, the output signal of the multiplexer 268 follows theinverted version of the output of comparator 260. Stated differently,during the first update time interval following detector powerup, theHOLD input signal causes the counter 274 to increment for as long asVsig is greater than PDAC. Thus, during the first update time interval,the PDAC voltage increases, as necessary, to track the most positivepeak of the Vsig voltage.

At the end of the first update time interval, the cnt 128 signal resetsthe latch 278, causing the en_update signal to go low to select the Binput to the multiplexer 268. The B multiplexer input signal is thephold signal provided by the update controller 280. As will becomeapparent, the phold signal is normally high, causing the counter 274 tobe disabled. However, at the end of any update time interval duringwhich a condition requiring updating of the PDAC voltage occurred, thephold signal goes low for a single system clock cycle to enable thecounter 274 to count up or down (depending on the logic level of thep_cnt_up signal) by a predetermined amount, such as one bit.

The “negative portion” of the HOLD logic circuitry, including inverter316 and multiplexer 320, is operative to provide the HOLD input signalto the counter 322 in a manner similar to that of inverter 266 andmultiplexer 268. In particular, during the first update time interval,when the en_update select input to the multiplexer 320 is high, themultiplexer 320 selects the A input for coupling to the HOLD input ofcounter 322. Accordingly, during the first update time interval, theNDAC voltage tracks the most negative peak of the Vsig voltage. At theend of the first update time interval, when the en_update signal goeslow, the B input to the multiplexer 320 (i.e., the nhold signal) isselected to provide the HOLD input signal to counter 322. Like the pholdsignal, the nhold signal is normally high, causing the counter 322 to bedisabled. However, at the end of any update time interval during which acondition requiring the NDAC voltage to be updated occurs, the nholdsignal goes low for a single system clock cycle to permit the counter322 to count up or down (depending on the logic level of the n_cnt_upsignal) by a predetermined amount, such as one bit.

Before discussing the update controller 280 shown in FIG. 22 and theillustrative way in which the phold, nhold, p_cnt_up and n_cnt_upsignals are generated, the manner by which the detector of FIG. 21updates the PDAC and NDAC voltages in accordance with certain variationsin the positive and negative peaks of the Vsig voltage, respectively,will be described in conjunction with FIGS. 23, 23 a, 24 and 25.Referring to FIG. 23 and the corresponding flow diagram of FIG. 24, thePDAC updating operation of the detector of FIG. 21 commences at step400, following which it is determined in step 404 whether the currentupdate time interval is over. Step 404 is repeated until a time intervalends, at which time it is determined in step 408 whether any positivepeak of the Vsig voltage during the just ending interval exceeded thePDAC voltage. If any positive peak of Vsig during the interval wasgreater than the PDAC voltage, then the PDAC voltage is incremented by apredetermined amount, such as one bit, in subsequent step 412, asillustrated at time X+1 in FIG. 23.

In step 416, it is determined whether all the positive peaks of the Vsigvoltage during the just ending interval were less than the PDAC−ΔVvoltage (i.e., whether all positive peaks of Vsig were less than thepositive voltage ok window). In the event that all positive Vsig peaksduring the interval were less than the positive voltage ok window, thenthe PDAC voltage is decremented by a predetermined amount, such as onebit, in subsequent step 420, following which the process terminates instep 424. This condition is illustrated at time X+2 in FIG. 23.Alternatively, the process terminates directly after step 416, as shown.

Referring to FIGS. 23a and 25, the operation of the detector of FIG. 21in updating the NDAC voltage commences at step 430, following which itis determined in step 434 whether the particular update time intervalhas ended. Once a time interval ends, it is determined in step 438whether any negative peak of the Vsig voltage during the just endinginterval was less than the NDAC voltage (i.e., was less than thenegative voltage ok window). In the event that a negative peak of theVsig voltage was less than the NDAC voltage, then the NDAC voltage isdecremented by a predetermined amount, such as one bit, in step 442.This condition is illustrated at time X+1 in FIG. 23a. Alternatively,step 442 is bypassed. Subsequently, in step 446, it is determinedwhether all of the negative peaks of the Vsig voltage during the justending interval were greater than the NDAC+ΔV voltage (i.e., whether allnegative Vsig peaks were greater than the negative voltage ok window).In the event that all negative Vsig peaks during the interval weregreater than the negative voltage ok window, then the NDAC voltage isincremented in step 450 by a predetermined amount, such as one bit,following which the process terminates in step 454. This condition isillustrated at time X+2 in FIG. 23a. Alternatively, the processterminates directly after step 446, as shown.

Referring to the update controller 280 of FIG. 22, like the controller120 of FIG. 14, the controller 280 includes a positive controllerportion 350 and a negative controller portion 352. The update controller280 will be described with particular reference to the positivecontroller portion 350 for simplicity. Also shown in the schematic ofFIG. 22 is the counter 128 which is responsive to the Vout signal forproviding the cnt128 signal, in the manner discussed above inconjunction with FIG. 14.

The positive controller portion 350 includes a comparator 354 forcomparing the Vsig voltage to the PDAC−ΔV voltage. The output signal ofcomparator 354, p_ok, is coupled to the reset input of a cross-coupledNOR latch 356, the set input to which receives the cnt128 signal. Theoutput of latch 356 is inverted by an inverter 358 to provide a p_latsmsignal, as shown. The p_latsm signal indicates whether or not the Vsigvoltage exceeded the lower boundary of the positive voltage ok window,PDAC−ΔV, during the just ending update time interval.

The comparator 260 (FIG. 21), which compares the Vsig voltage to thePDAC voltage, provides a pcomp signal which is coupled to the updatecontroller 280 and, specifically, to the set input of a cross-coupledNOR latch 360. The NOR latch 360 is reset by the cnt128 signal andprovides, at its output, a p_latbig signal, as shown. The p_latbigsignal indicates whether or not the Vsig voltage exceeded the upperboundary of the positive voltage ok window, PDAC, during the just endingupdate time interval.

The p_latsm and p_latbig signals are coupled to respective inputs of anOR gate 364, the output of which is coupled to a first input of an ANDgate 366. The second input to AND gate 366 is provided by the en_updatesignal, as shown. The output signal of AND gate 366 is coupled to the Dinput of a flip-flop 368, the Q output of which provides a p_updatesignal. The flip-flop 368 is clocked by the cnt128 signal and is resetby the output of a NOR gate 370, as shown. The p_update signal providesthe D input to a further flip-flop 374, the Q output of which is fedback to a first input of the NOR gate 370. The second input to NOR gate370 receives the startup signal, as shown. The Qbar output of flip-flop374 provides the phold signal to the B input of multiplexer 268 (FIG.21).

The p_latsm signal is further coupled to a flip-flop 376, the Qbaroutput of which provides the p_cnt_up signal to the counter 274FIG. 21)to control the direction of operation of the counter. The flip-flop 376is clocked by the cnt128 signal and reset by the startup_n signal, asshown.

As noted above, the negative controller portion 352 is substantiallyidentical to the positive controller portion 350. More particularly, thenegative controller portion 352 includes a comparator 378 which comparesthe Vsig voltage to the upper boundary of the negative voltage okwindow, NDAC+ΔV. The n_ok output signal of comparator 378 is coupled toa latch 380, the output of which is inverted by an inverter 382. Thecomparator 264 (FIG. 21), which compares the Vsig voltage to the NDACvoltage, provides an output signal, ncomp, which is coupled to a latch384, as shown. The output of latch 384 is an n_latbig signal and theoutput of inverter 382 is an n_latsm signal both of which are coupled toinputs of an OR gate 386. The n_latsm signal is further coupled to theinput of a flip-flop 396. The output of flip-flop 396 provides then_cnt_up signal which controls the direction of operation of counter 322(FIG. 21). The output of OR gate 386 is coupled to a first input of anAND gate 388, the second input to which is provided by the en_updatesignal. The output of AND gate 388 is coupled to a flip-flop 390 whichprovides an n_update signal to a further flip-flop 394. The Qbar outputof flip-flop 394 provides the nhold signal to the multiplexer 320 (FIG.21). The Q output of flip-flop 394 is fed back to a NOR gate 392 whichis further responsive to the startup signal for resetting the flip-flop390.

Considering operation of the positive controller portion 350, the latch356 is set at the end of each update time interval and is reset when theVsig voltage exceeds the PDAC−ΔV voltage. Thus, the p_latsm outputsignal of inverter 358 transitions to a logic low level during anyupdate time interval in which at least one positive Vsig peak exceededPDAC−ΔV.

Latch 360 is set when the Vsig voltage exceeds the PDAC voltage and isreset at the end of each update time interval. Thus, the p_latbig signaltransitions to a logic high level when the Vsig voltage exceeds the PDACvoltage and remains high until the end of the particular update timeinterval. Accordingly, the output of OR gate 364 is high if either (1)the Vsig voltage has exceeded the PDAC voltage during the current timeinterval; or (2) the Vsig voltage has been less than the PDAC−ΔV voltageduring the entire current time interval (i.e., if a condition hasoccurred requiring the PDAC voltage to be updated).

If the output of OR gate 364 is high and the first update time intervalfollowing detector startup has passed, then the output of AND gate 366goes high. Under this condition, at the end of the current update timeinterval, the flip-flop 368 latches in the high input signal to providea logic high p_update signal to the flip-flop 374. Further, at the endof the current system clock cycle, the logic high p_update signal islatched into flip-flop 374 to provide a logic low phold signal to themultiplexer 268 (FIG. 21). With the phold signal low, the HOLD input tothe counter 274 is likewise low, thereby enabling the counter 274 tocount. Further, the phold signal remains low for only a single systemclock cycle so that the counter 274 increments or decrements by apredetermined amount, such as one bit.

The direction of operation of counter 274 is determined by the logiclevel of the p_cnt_up signal. As noted above, the p_cnt_up signal isnormally high, causing the counter 274 to count up. However, when thep_latsm signal is low at the end of an update time interval (i.e., ifall positive peaks of the Vsig voltage during the just ending intervalwere less than PDAC−ΔV), then flip-flop 376 causes the p_cnt_up signalto go low, causing the counter 274 to count down. Further, the counter274 counts down for only a single clock cycle since the phold signal islow or only a single clock cycle.

The operation of the positive controller portion 350 will become moreapparent by reference to the three illustrative update time intervals ofthe Vsig voltage in FIG. 26, which shows only the positive peaks of theVsig voltage for simplicity of illustration. During the interval betweentimes X and X+1, one of the positive peaks of the Vsig voltage exceedsthe PDAC voltage. Thus, at the end of the interval, the PDAC voltage isincremented by one bit. To this end, when the Vsig voltage exceeds thePDAC voltage, the pcomp signal goes high and transitions back to a lowlevel when the Vsig voltage decreases to below the PDAC voltage, asshown in FIG. 26a. The positive going transition of the pcomp signalcauses the latch 360 to be set and the p_latbig signal to go high, asshown in FIG. 26b. The p_ok output signal of comparator 354 transitionsto a high level every time the Vsig voltage exceeds the PDAC−ΔV voltageand returns to a logic low level when the Vsig voltage falls to belowthe PDAC−ΔV voltage, as shown in FIG. 26d. Thus, the p_latsm signal goeslow following the first positive going transition of the p_ok signalduring the interval, as shown in FIG. 26e.

At the end of the update time interval, at time X+1, the cnt128 signalgoes high, which causes flip-flop 368 to latch in the high input signaland the p_update signal to go high. Further, at time X+1, flip-flop 376latches in the low input signal, causing the p_cnt_up signal to go highand the counter 274 to count up. During the interval ending at time X+1,the D input to latch 368 went high due to the p_latbig signal going highas Vsig exceeded PDAC. Also during this interval, the D input toflip-flop 376 went low due to the p_ok signal resetting latch 356. Onthe falling edge of the system clock signal CLK following the end of theupdate time interval, the phold output signal of flip-flop 374 goes lowuntil the next falling edge of the CLK signal. The p_update signalreturns to a logic low level when the flip-flop 368 is reset by thephold signal going low. With this arrangement, the counter 274 isenabled by the phold signal to count for a single clock cycle.

During the time interval between times X+1 and X+2, all of the positivepeaks of the Vsig voltage are less than the positive voltage ok window,or PDAC−ΔV. Under this condition, the PDAC voltage is decremented by onebit at the end of the interval. Since the Vsig voltage remains less thanPDAC−ΔV, the latch 356 is not reset during this time interval and thep_latsm signal remains high. With p_latsm high, the output of OR gate364 goes high and, since the time interval is not the first followingdetector start up, the output of AND gate 366 goes high. At time X+2,the p_update signal goes high and upon the next falling edge of the CLKsignal, phold goes low for a single clock cycle. Thus, under thiscondition, the counter 274 is enabled to count up or down by one bit. Inparticular, the counter 274 counts down, since the p_cnt_up signal islow due to the p_latsm signal being high, as shown.

Considering finally the interval between times X+2 and X+3, one of thepositive Vsig peaks is within the positive voltage ok window during thisinterval. Thus, the PDAC voltage is not updated at the end of theinterval. To this end, once the Vsig voltage exceeds the PDAC−ΔVvoltage, the p_ok output signal of comparator 354 goes high and resetsthe latch 356 causing the p_latsm signal to go low. Since the p_latsmsignal is low at the end of the interval, the outputs of OR gate 364 andAND gate 366 are low. Thus, the p_update signal and the phold signalremain low and the counter 274 remains disabled, thereby preventing thePDAC voltage from being updated.

Referring to FIG. 27, a further alternate magnetic field detector isshown. The detector of FIG. 27, like the previously describedembodiments, provides an output voltage Vout which is at one binarylevel when the Vsig voltage exceeds a VTH threshold voltage and is atanother binary level when the Vsig voltage is less than the VTHthreshold voltage. Further, the detector of FIG. 27 provides the VTHthreshold voltage with hysteresis in a like manner to the detectors ofFIGS. 13 and 21 in that the VTH threshold voltage is a percentage of thepeak-to-peak voltage of Vsig, and is updated to remain the percentage ofthe peak-to-peak voltage of Vsig, within a predetermined tolerance, evenas the peak-to-peak voltage of Vsig varies. In particular, the VTHthreshold voltage is at a first level corresponding to a firstpercentage of the peak-to-peak voltage of Vsig when Vsig exceeds the VTHthreshold voltage and is at a second level corresponding to a secondpercentage of the peak-to-peak voltage of Vsig when Vsig is less thanthe VTH threshold voltage.

The detector of FIG. 27 differs from those previously described howeverin the manner in which the PDAC and NDAC voltages are updated. Thedetector of FIG. 27 updates the PDAC and NDAC voltages by apredetermined amount (e.g., by a predetermined number of bits) aftertransitions of the Vout voltage and permits the PDAC and NDAC voltagesto freely track the positive and negative peaks of the Vsig voltage,respectively. More particularly, the PDAC voltage is decremented by apredetermined amount upon transitions of the Vout voltage of a firstpolarity and the NDAC voltage is incremented by a predetermined amountupon transitions of the Vout voltage of a second, opposite polarity.

With this arrangement, a relatively simple and robust circuit andtechnique are provided for updating the PDAC and NDAC voltages to ensurethat the VTH threshold voltage remains, within a predeterminedtolerance, a percentage of the peak-to-peak Vsig voltage, even as thepeak-to-peak Vsig voltage varies. Further advantages of the detector ofFIG. 27 include additional hysteresis which serves to reduce thesusceptibiltiy of the circuit to noise, but which is introduced at atime when the switch points defining transitions of the Vout voltage arenot affected, as will be described below. Additionally, the detector hasa relatively fast response time to changes in the peak-to-peak Vsigvoltage, since the PDAC and NDAC voltages are updated at each transitionof the Vout voltage. In this way, the detector of FIG. 27 provides aVout signal which accurately reflects changes in the sensed magneticfield and reduces the likelihood that the Vout signal would not switchfollowing significant peak Vsig voltage variations. Further, circuittesting and thus manufacture time and cost is reduced since complicatedPDAC and NDAC voltage updating decisions are eliminated by updating thePDAC and NDAC voltage by a predetermined amount after transitions of theVout signal.

It will be appreciated by those of ordinary skill in the art, and iswithin the scope of this invention, that the various techniques forupdating the PDAC and NDAC voltages described herein may be implementedin the form of, or to include, mid-signal detectors in which thethreshold voltage is a fixed percentage of the peak-to-peak Vsig voltage(as is determined by computing a fixed percentage of the voltagePDAC−NDAC) or peak-referenced (i.e., slope-activated) detectors. As oneexample, the peak-to-peak percentage threshold detectors may include apeak-referenced detector such that the detector output signal Voutbecomes one binary level when Vsig rises to exceed a held negative peakexcursion (the NDAC voltage) by a predetermined amount and anotherbinary level when Vsig falls to below a held positive peak excursion(the PDAC voltage) by a predetermined amount.

With the exception of the update controller 125, which is shown anddescribed in conjunction with FIG. 28, the detector of FIG. 27 issubstantially identical to the detector of FIG. 13, as is illustrated bythe use of like reference numbers for like components. Thus, the counter114 is a six bit counter which is enabled when the HOLD input (at theoutput of NOR gate 108) is low. Further the direction of operation ofthe counter 114 is governed by the p_cnt_up signal. In particular, whenthe counter 114 is enabled and the p_cnt_up signal is high, the counter114 counts up and when the counter 114 is enabled and the p_cnt_upsignal is low, the counter 114 counts down. Likewise, the counter 130 isenabled when the output of NOR gate 112 is low and is disabled when theoutput of NOR gate 112 is high. Further, when the counter 130 is enabledand the n_cnt_up signal is high, counter 130 counts up and when thecounter 130 is enabled and the n_cnt_up signal is low, the counter 130counts down.

The outputs of the counter 114 are coupled to inputs of PDAC 118, theoutputs of which provide the PDAC voltage which is used to generate theVTH threshold voltage. The PDAC voltage is coupled to a buffer 124 andis fed back to the negative input of comparator 100, as shown. Thecomparator 100, NOR gate 108, counter 114, PDAC 118 and buffer 124comprise a “positive portion” of the detector circuitry. A “negativeportion” of the detector includes like circuitry similarly arranged.Specifically, the output of the NOR gate 112 is coupled to a HOLD inputof counter 130 which is responsive to the CLK clock signal, thepndac_resn_reset signal, and an n_cnt_up control signal provided by theupdate controller 125 (FIG. 28) which controls the count direction. Theoutputs of the counter 130 are coupled to inputs of NDAC 134 whichprovides the NDAC voltage which is used, along with the PDAC voltage, togenerate the VTH threshold voltage. The NDAC voltage is coupled tobuffer 136 and is further fed back to the negative input of comparator104, as shown.

The buffered PDAC and NDAC voltages are coupled to resistor divider 140which generates the VTH threshold voltage for comparison to the Vsigvoltage by a comparator 160. The output of comparator 160 provides thedetector output signal, Vout, which is at a first binary, or logic levelwhen the Vsig voltage exceeds the VTH threshold voltage and is at asecond binary level when the Vsig voltage is less than the VTH thresholdvoltage. Further, the VTH threshold voltage is provided with hysteresisin the sense that VTH is at a first level corresponding to a firstpercentage of the peak-to-peak Vsig voltage when Vsig exceeds the VTHthreshold voltage and is at a second level corresponding to a secondpercentage of the peak-to-peak Vsig voltage when Vsig is less than theVTH threshold voltage. That is, once the Vsig voltage falls below thefirst level of the VTH threshold voltage, the VTH threshold voltage isincreased so that the Vsig voltage has to exceed a second, higher levelof the VTH threshold voltage before the Vout signal transitions.

Before discussing the update controller 125 of FIG. 28, the manner inwhich the PDAC and NDAC voltages are updated will be described withreference to the waveforms of FIGS. 29, 29 a, 29 b, 30 and 30 a. Theillustrative Vsig voltages of FIGS. 29 and 30 are shown with thepositive peaks changing and with the negative peaks varying,respectively. It will be appreciated that the positive and negativepeaks of Vsig may vary as a result of different factors, such as changesin the airgap between the magnetic article and the detector, a chippedgear tooth in the magnetic article, or a piece of metal being stuckbetween gear teeth. Further, it will be appreciated that both thepositive and negative peaks of the Vsig voltage will vary within a givenmagnetic article revolution. However, the waveform of FIG. 29 is shownwith only the positive peaks varying and the waveform of FIG. 30 isshown with only the negative peaks varying for simplicity ofillustration.

The PDAC and NDAC voltages are permitted to freely track the positiveand negative peaks of the Vsig voltage, respectively. Further, upon eachtransition of the Vout signal, the PDAC and NDAC voltages aredecremented and incremented, respectively, by a predetermined amount. Inparticular, the PDAC voltage is decremented by a predetermined amountupon each transition of the Vout signal of a first polarity (e.g.,positive-going) and the NDAC voltage is incremented by a predeterminedamount upon each transition of the Vout voltage of the second, oppositepolarity (e.g., negative-going). In the illustrative embodiment, thePDAC and NDAC voltages are decremented and incremented, respectively, bythree bits. However, the predetermined amount can be readily varied and,in general, is selected to approximately equal the largest expectedvoltage variation between successive Vsig peaks.

Referring to FIG. 29, at time t2, when the Vout voltage transitions to ahigh level, the PDAC voltage is decremented by three bits. Thereafter,the PDAC voltage tracks the Vsig voltage back up to its next positivepeak. The same occurs at times t4, t6, t8, and t12. However, at timet10, when the PDAC voltage is decremented by three bits, the PDACvoltage is greater than the next positive peak of the Vsig voltage(occurring between times t10 and t11) and thus, the PDAC voltage doesnot track the Vsig voltage again until time t12.

Referring also to FIG. 30, at time t21, when the Vout voltagetransitions to a low level, the NDAC voltage is incremented by threebits. Thereafter, the NDAC voltage tracks the Vsig voltage back down toits next negative peak. And the same occurs at times t23, t27, t29 andt31. However, at time t25, when the NDAC voltage is incremented by threebits, the NDAC voltage is less than the next negative peak of the Vsigvoltage (occurring between times t25 and t26) and thus, the NDAC voltagedoes not track the Vsig voltage again until time t27.

Recall that the VTH threshold voltage is generated by a resistor dividernetwork 140 (FIG. 27) coupled between the PDAC and NDAC voltages whichincludes switches 166, 168 controlled by the Vout and pos_compn controlsignals such that the VTH threshold voltage is at a first percentage,such as on the order of 40%, of PDAC−NDAC when the Vout voltage is at afirst level and is at a second percentage, such as on the order of 60%,of PDAC−NDAC when the Vout voltage is at a second level. In FIGS. 29 and30, the VTH voltage is shown by a solid line and the other one of thefirst and second percentages of PDAC−NDAC is shown by a dotted line.

Since the VTH threshold voltage is a function of the PDAC and NDACvoltages, as the PDAC and NDAC voltages are updated, so too is the VTHthreshold voltage, as shown. This is best seen in the expanded view ofFIG. 29b. At time t8, when the PDAC voltage is decremented, the VTHvoltage is decremented too. Thereafter, as the PDAC voltage tracks theVsig voltage to its next positive peak, the VTH threshold voltage movesup concomitantly.

As is further apparent from consideration of FIG. 29b, the VTH thresholdvoltage updating scheme implemented with the embodiment of FIGS. 27 and28 provides additional threshold voltage hysteresis. For example, attime t8, when the VTH threshold voltage changes from the firstpercentage of PDAC−NDAC to the second, lower percentage of PDAC−NDAC, asshown by the solid line, the VTH voltage is pulled even lower, so thatthe Vsig voltage would have to go even lower to cause the Vout voltageto switch. Significantly however, this additional hysteresis is providedat a time t hat does not affect the switch points of Vout voltage. Thatis, by the time the Vsig voltage crosses the VTH threshold voltage againat time t9, the PDAC voltage has tracked the next positive peak of theVsig voltage and the additional hysteresis no longer affects the VTHvoltage. This is particularly advantageous in systems in which theswitch points are required to be close to each other, but noise on theVsig signal makes it desirable for the switch points to be far apart inorder to avoid switching as a result of the noise.

Referring also to FIG. 28, the update controller 125 includes a positiveportion 400 and a negative portion 402. The positive and negativecontroller portions are structurally substantially identical, but areresponsive to different input signals and provide different outputsignals. In particular, the positive portion 400 is responsive to theVout signal and generates the p_cnt_up signal for coupling to the NORgate 108 and to the counter 114 of FIG. 27 and the p_cnt_up_n signal forcoupling to the counter 114. The negative portion 402 is responsive tothe inverse of the Vout signal, Voutn, and generates the n_cnt_up signalfor coupling to the NOR gate 112 and to the counter 130 of FIG. 27 andthe n_cnt_up_n signal for coupling to the counter 130.

The positive portion 400 of the update controller 125 includes aflip-flop 406 clocked by the Vout signal. A dcrp signal is provided atthe Q output of the flip-flop 406 and is coupled to the D input to aflip-flop 408. Flip-flop 408 is clocked by the CLKN signal and providesthe p_cnt_up signal at its Qbar output, as shown. The p_cnt_up signal isfurther coupled to an input of a NOR gate 410, the second input whichreceives the startup signal. The output of the NOR gate 410 is coupledto a reset input of a pair of flip-flops 416, 418 which are connected toform a ring counter 420. The outputs 422, 424 of the ring counter 420are coupled to inputs of an AND gate 428. A pdone signal provided at theoutput of the AND gate 428 is coupled to an input of a NOR gate 430, theoutput of which resets the flip-flop 406. The negative controllerportion 402 includes flip-flops 430, 432, flip-flops 434 and 436 formingring counter 444, and gates 438, 440, and 442 coupled and arranged inthe same manner as like elements of the positive portion 400.

The operation of the update controller 125 will be illustrated byconsideration of FIG. 28 in conjunction with the illustrative Vsigwaveform of FIG. 31 and the Vout, dcrp, CLK, p_cnt_up, ring counteroutput and pdone signals of FIGS. 31a-31 f. In order to permit the PDACand NDAC voltages to track the positive and negative peaks of the Vsigvoltage, respectively, the update controller 125 enables the counters114 and 130 at all times except as follows: (1) the counter 114 isdisabled when the p_cnt_up signal is high which causes the counter 114to count up and the PDAC voltage is greater than the Vsig voltage; and(2) the counter 130 is disabled when the n_cnt_up signal is high whichcauses counter 130 to count up and the NDAC voltage is less than theVsig voltage. In this way, the PDAC voltage is held at the positive peakof the Vsig voltage and is prevented from exceeding the positive peak ofthe Vsig voltage and the NDAC voltage is held at the negative peak ofthe Vsig voltage and is prevented from falling below the negative peakof the Vsig voltage. At all other times, the counters 114 and 130 areenabled.

The PDAC voltage is decremented by a predetermined amount upon eachpositive-going transition of the Vout voltage and the NDAC voltage isincremented by a predetermined amount upon each negative-goingtransition of the Vout voltage. To this end, when Vout transitions to alogic high level (and once the startup signal transitions, indicatingthat a certain time has lapsed since power up), the flip-flop 406 is setand causes the dcrp output signal to go high as shown in FIG. 31b. Uponthe next falling edge of the CLK signal (or rising edge of CLKN),flip-flop 408 causes the p_cnt_up signal to go low, as shown in FIG.31d. In its low state, the p_cnt_up signal commands the counter 114(FIG. 27) to count down. Further, the counter 114 is enabled since thep_cnt_up_n signal coupled to the NOR gate 108 (FIG. 27) is high. Thecounter 114 thus counts down once per CLKN edge until the p_cnt_upsignal transitions to a high level which this occurs once the ringcounter 420 counts to a predetermined value (corresponding to thepredetermined amount by which the PDAC voltage is to be decremented).

More particularly, in its low state, the p_cnt_up signal causes thereset inputs to the ring counter flip-flops 416, 418 to be released.Thus, upon each rising edge of the CLK signal, the ring counter 420increments. Once the ring counter 420 counts to three, the pdone outputsignal of AND gate 428 goes high, thereby causing the flip-flop 406 tobe reset which, in turn, causes the dcrp signal to transition to a lowlevel. Upon the next falling edge of the CLK signal, the p_cnt_up signaltransitions to a high level, thereby causing the counter 114 to countup. The rising edge of the p_cnt_up signal further causes the ringcounter 420 to be reset and thus, the pdone signal to return to its lowlevel, as shown in FIG. 31f

Conversely, when Vout transitions to a logic low level, the flip-flop430 is set and causes the dcrn signal to go high, as shown in FIG. 31g.Upon the next rising edge of CLKN, flip-flop 432 causes the n_cnt_upsignal to go low, as shown in FIG. 31i. In its low state, the n_cnt_upsignal commands the counter 130 (FIG. 27) to count down. Further, thecounter 130 is enabled since the n_cnt_up_n signal coupled to the NORgate 112 (FIG. 27) is high. The counter 130 thus counts down toincrement the NDAC voltage until the n_cnt_up signal transitions to ahigh level which occurs once the ring counter 444 counts to three.

More particularly, in its low state, the n_cnt_up signal causes thereset inputs to the ring counter flip-flops 434, 436 to be released.Thus, upon each rising edge of the CLK signal, the ring counter 444increments. Once the ring counter 444 counts to three, the ndone outputsignal of AND gate 438 goes high, causing the flip-flop 430 to be resetwhich, in turn, causes the dcm signal to transition to a low level. Uponthe next falling edge of the CLK signal, the n_cnt_up signal transitionsto a high level, causing the counter 430 to count up. The rising edge ofthe n_cnt_up signal further causes the ring counter 444 to be reset andthus, the ndone signal to return to its low level as shown in FIG. 31k.

In certain instances, jitter on the Vsig signal may cause concern aboutunnecessary and inaccurate Vout switching. This scenario could result ifnoise on the Vsig signal causes the Vsig signal to bounce above andbelow the VTH threshold voltage. One way to eliminate this possibilityis to slow down the CLK signal. In this way, the relatively highfrequency noise will not cause the Vout voltage to switch.

Another alternative for eliminating the deleterious effects ofrelatively high frequency Vsig noise is to add an integrator to thecomparators 100 and 104 (FIG. 27). Referring to FIG. 32, illustrativecomparator 100 is shown to include an integrator comprising a resistor103 and a capacitor 105 coupled in feedback relationship with anoperational amplifier 107. The output of the operational amplifier 107,Vint, is coupled to a buffer 109 with hysteresis to provide thecomparator output signal (which is coupled to an input of NOR gate 108(FIG. 27)).

Referring also to FIG. 33, when a noisy Vsig is processed by thecomparator 100 (FIG. 32), the noise is integrated and the Vout voltagedoes not switch until the Vint voltage exceeds the VTH voltage, asshown. It will be appreciated by those of ordinary skill in the art thatthe above-presented jitter solutions can be implemented with any of thedetector embodiments described herein.

Having described the preferred embodiments of the invention, it will nowbecome apparent to one of ordinary skill in the art that otherembodiments incorporating their concepts may be used. It is felttherefore that these embodiments should not be limited to disclosedembodiments, but rather should be limited only by the spirit and scopeof the appended claims. All publications and references cited herein areexpressly incorporated herein by reference in their entirety.

What is claimed is:
 1. A method for detection of passing magneticarticles, comprising the steps of: a) sensing an ambient magnetic fieldand generating a voltage, Vsig, that is proportional to the magneticfield; b) generating a threshold voltage that is a percentage of thepeak-to-peak voltage of Vsig; c) generating a detector output voltagethat becomes a first binary level when Vsig rises to exceed thethreshold voltage and a second binary level when Vsig falls to below thethreshold voltage; and d) updating the threshold voltage by apredetermined amount upon each transition of the detector output voltagebetween the first and second binary levels.
 2. The method of claim 1further comprising the step of updating the threshold voltage to trackthe positive and negative peaks of the Vsig voltage.
 3. The method ofclaim 1 wherein the threshold voltage generating step comprises: a)providing the threshold voltage at a first level that is a firstpercentage of the peak-to-peak voltage of Vsig when Vsig exceeds thethreshold voltage; and b) providing the threshold voltage at a secondlevel that is a second percentage of the peak-to-peak voltage of Vsigwhen Vsig is less than the threshold voltage.
 4. The method of claim 3wherein the threshold voltage generating step comprises: a) generating aPDAC voltage as a function of positive peak values of Vsig; and b)generating an NDAC voltage as a function of negative peak values ofVsig, wherein the first level of the threshold voltage is the firstpercentage of the voltage PDAC−NDAC and the second level of thethreshold voltage is the second percentage of the voltage PDAC−NDAC. 5.The method of claim 4 wherein the threshold voltage updating stepcomprises: a) decreasing the PDAC voltage by the predetermined amountupon transitions of the detector output signal from the second binarylevel to the first binary level; and b) increasing the NDAC voltage bythe predetermined amount upon transitions of the detector output signalfrom the first binary level to the second binary level.
 6. A magneticarticle proximity detector comprising: a magnetic field sensor providinga voltage output signal, Vsig, proportional to a magnetic field; athreshold voltage generator operative to generate a threshold voltagethat is a percentage of the peak-to-peak voltage of Vsig; and acomparator comparing Vsig to the threshold voltage to generate adetector output voltage that becomes a first binary level when Vsigrises to exceed the threshold voltage and a second binary level whenVsig falls to below the threshold voltage, wherein the threshold voltageis updated by a predetermined amount upon each transition of thedetector output voltage.
 7. The magnetic article proximity detector ofclaim 6 wherein said threshold voltage generator comprises: a PDACvoltage generator for generating a PDAC voltage as a function ofpositive peak values of Vsig; an NDAC voltage generator for generating aNDAC voltage as a function of negative peak values of Vsig; and acircuit coupled between the PDAC voltage and the NDAC voltage forproviding the threshold voltage as a percentage of the differencebetween the PDAC voltage and the NDAC voltage.
 8. The magnetic articleproximity detector of claim 7 wherein said PDAC voltage generatorcomprises a first counter having an output at which a first count signalis provided and a first digital to analog converter having an inputcoupled to the output of the first counter and an output at which saidPDAC voltage is provided, wherein said first counter counts in a firstdirection causing said PDAC voltage to increase when said Vsig voltageis greater than said PDAC voltage.
 9. The magnetic article proximitydetector of claim 8 wherein said first counter counts in a second,opposite direction for a predetermined duration upon transitions of saiddetector output voltage from said second binary level to said firstbinary level.
 10. The magnetic article proximity detector of claim 7wherein said NDAC voltage generator comprises a second counter having anoutput at which a second count signal is provided and a second digitalto analog converter having an input coupled to the output of the secondcounter and an output at which said NDAC voltage is provided, whereinsaid second counter counts in a first direction causing said NDACvoltage to decrease when said Vsig voltage is less than said NDACvoltage.
 11. The magnetic article proximity detector of claim 10 whereinsaid second counter counts in a second, opposite direction for apredetermined duration upon transitions of said detector output voltagefrom said first binary level to said second binary level.
 12. A methodof detecting passing magnetic articles, comprising the steps of: a)sensing an ambient magnetic field and generating a voltage, Vsig, thatis proportional to the magnetic field; c) generating a PDAC voltage as afunction of positive peak values of Vsig; d) generating an NDAC voltageas a function of negative peak values of Vsig; e) generating a thresholdvoltage as a percentage of the difference between the PDAC and NDACvoltages; f) generating a detector output voltage that becomes a firstbinary level when Vsig rises to exceed the threshold voltage and asecond binary level when Vsig falls to below the threshold voltage; g)updating the PDAC voltage by a predetermined amount upon transitions ofthe detector output voltage from the second binary level to the firstbinary level; and h) updating the NDAC voltage by the predeterminedamount upon transitions of the detector output voltage from the firstbinary level to the second binary level.
 13. The method of claim 12wherein the threshold voltage generating step comprises: a) providingthe threshold voltage at a first level that is a first percentage of thepeak-to-peak voltage of Vsig when Vsig exceeds the threshold voltage;and b) providing the threshold voltage at a second level that is asecond percentage of the peak-to-peak voltage of Vsig when Vsig is lessthan the threshold voltage.
 14. The method of claim 12 wherein the PDACvoltage updating step includes decrementing the PDAC voltage by thepredetermined amount upon positive-going transitions of the detectoroutput voltage.
 15. The method of claim 12 wherein the NDAC voltageupdating step includes incrementing the NDAC voltage by thepredetermined amount upon negative-going transitions of the detectoroutput voltage.